#include <mockcpp/mockcpp.hpp>

#include <testngpp/testngpp.hpp>
#include <Rectangle.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(Rectangle)
{
	TEST(should be able to get the width of a rectangle)
	{
		Rectangle rect(7,9);
		ASSERT_EQ(7, rect.getWidth());
	}

	TEST(should be able to get the height of a rectangle)
	{
		Rectangle rect(1000,2000);
		ASSERT_EQ(2000, rect.getHeight());
	}

    	TEST(should be able to calculate a rectangle area: 2 * 3 = 6)
    	{
        	Rectangle rect(2, 3);
        	ASSERT_EQ(6, rect.getArea());
    	}

    	TEST(should be able to calculate  a rectangle perimeter: 2*(100 + 200) = 600)
	{	
		Rectangle rect;
		rect.setWidth(100);
		rect.setHeight(200);
        	ASSERT_EQ(600, rect.getPerimeter());
	}

	TEST(should be able to get the side of a square)
	{
		Square square(9);
		ASSERT_EQ(9, square.getSide());
	}

        TEST(SHOULD be able to set the side of a square)
        {
                Square square(5);
                square.setSide(7);
                ASSERT_EQ(7, square.getSide());
        }

	TEST(should be able to calculate a square area: 4 * 4 = 16)
	{
		Square square(4);
		ASSERT_EQ(16, square.getArea());
	}

	TEST(should be able to calculate  a Square perimeter:4 * 100 = 400)
	{
		Square square;
		square.setSide(100);
		ASSERT_EQ(400, square.getPerimeter());
	}
};
